//
//  PPNetCustomRequest.h
//  PiPi
//
//  Created by 邓标祥 on 2020/12/15.
//  Copyright © 2020 PiPiWholseSale. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PPNetRequest.h"
NS_ASSUME_NONNULL_BEGIN


@interface PPCustomRequestGeneral : NSObject

+ (instancetype)sharedGeneral;

@property (nonatomic, copy) NSString *phpHost;
@property (nonatomic, strong) NSMutableDictionary *phpGeneralHeader;
@property (nonatomic, strong) NSMutableDictionary *phpGeneralParameters;

@property (nonatomic, copy) NSString *javaHost;
@property (nonatomic, assign) NSInteger timestampDiff; // 本地时间的差值 - 服务器时间
@property (nonatomic, strong) NSMutableDictionary *javaGeneralHeader;
@property (nonatomic, strong) NSMutableDictionary *javaGeneralParameters;

@property (nonatomic, copy) NSString *zuulSignAppKey;


+ (void)loginSuccessWithUserId:(NSString * _Nonnull)userId token:(NSString * _Nonnull)token watermark:(NSString * _Nonnull)watermark uuid:(NSString *)uuid idfa:(NSString *)idfa;

+ (void)loginSuccessWithStoreId:(NSString *)storeId;

+ (void)clearLoginInfo;
@end

@interface PPPhpRequest : PPNetRequest

@property (nonatomic, copy, nonnull, readonly) NSString *cmd;

/// init
/// @param httpMethod http请求类型
/// @param cmd cmd
/// @param param 参数
+ (instancetype)request:(PPNetHTTPMethodType)httpMethod
                    cmd:(NSString * _Nonnull)cmd
                  param:(NSDictionary * _Nullable)param;


/// init
/// @param httpMethod http请求类型
/// @param cmd cmd
/// @param param 参数
/// @param classModel 业务模型类对象
+ (instancetype)request:(PPNetHTTPMethodType)httpMethod
                    cmd:(NSString * _Nonnull)cmd
                  param:(NSDictionary * _Nullable)param
                toClass:(Class _Nullable)classModel;
@end

#pragma mark -
/// ************************************ 全省港澳所有既分割线唯独呢条至靓仔 ************************************ ///

@interface PPJavaRequest : PPNetRequest

/// init
/// @param httpMethod http请求类型
/// @param path 路径
/// @param param 参数
+ (instancetype)request:(PPNetHTTPMethodType)httpMethod
                   path:(NSString * _Nonnull)path
                  param:(NSDictionary * _Nullable)param;

/// init
/// @param httpMethod http请求类型
/// @param path 路径
/// @param param 参数
/// @param classModel 业务模型类对象
+ (instancetype)request:(PPNetHTTPMethodType)httpMethod
                   path:(NSString * _Nonnull)path
                  param:(NSDictionary * _Nullable)param
                toClass:(Class _Nullable)classModel;

@end





@interface NSString(PPNetRequest)


+ (NSString *)getRandomStringWithNum:(NSInteger)num;

//HmacMD5加密
+(NSString *)hmacMD5:(NSString *)key data:(NSString *)data;

@end

NS_ASSUME_NONNULL_END
